1. Field of the Invention
The present invention generally relates to methods of setting parameters of a peripheral device and peripheral devices, and more particularly, to a method of setting parameters of a peripheral device and a peripheral device whose operation is controlled based on the parameters stored inside the peripheral device.
2. Description of the Related Art
A large number of parameters are set in a peripheral device such as a hard disk drive in order to improve the performance of the peripheral device. Proper operation to use a drive in current conditions can be implemented by changing the parameters. However, it is not easy to set a large number of parameters properly. Hence, there is a demand for a method by which the parameters can be set to use the drive properly based on the current conditions.
For example, a small computer system interface (SCSI) standard is used as a standard of an interface for connecting the peripheral device such as the hard disk drive with a host computer.
Parameters for improving the performance of the hard disk drive are set in the SCSI standard. A mode parameter is used as the main parameter of the parameters set in the SCSI standard. The mode parameter mainly includes the number of cache segment, the cache segment size, the buffer full ratio, the buffer empty ratio, the read cache disable bit, the write cache enable bit, the minimum pre-fetch parameter, the maximum pre-fetch parameter, and the queue algorithm modifier.
The cache segment number is a parameter for dividing all data cache areas held by the hard disk drive.
The cache segment size is a parameter for designating the number of bytes into which all data cache areas held by the hard disk drive are divided.
The buffer full ratio is a parameter for designating the amount of data to be loaded from a medium to a data buffer until the disk storage device starts to execute a reconnection process at the time a read process is executed
When a write process is executed, the disk storage device executes to write data in the medium until the reconnection process is started. As a result, the data buffer is provided with an opening area. The buffer empty ratio is a parameter for designating a size of the opening area at the data buffer.
The read cache disable bit is a parameter for allowing or prohibiting an operation of a cache mechanism when the read process is executed.
The write cache enable bit is a parameter for allowing or prohibiting an operation of a cache mechanism when the write process is executed.
The minimum pre-fetch parameter is a parameter for designating a minimum amount of a logic data block that is pre-fetched to the data buffer when the read process is executed.
The maximum pre-fetch parameter is a parameter for designating a maximum amount of the logic data block that is pre-fetched to the data buffer when the read process is executed.
The queue algorithm modifier is a parameter for controlling an algorithm of an execution order of a command issued with a simple queue tag.
In addition, the hard disk drive includes a cache function whose operation in the case of a read process is different from in the case of a write process, in order to utilize the data buffer effectively and improve effective access speed.
In a cache function at the time of the read process, required data are read from the medium and transmitted to the host computer when a read command is executed, and a pre-fetching is executed. In the pre-fetching, a following data block to the final logic data block designated by the read command is loaded into the data buffer. When some of the pre-fetched data blocks are designated by a read command issued later, the hard disk drive does not access the medium and but instead the data are transmitted from the data buffer to the host computer directly. Based on such a process, it is possible to drastically reduce the effective access time in a case that a sequential logic data block group is read out sequentially.
It is expected to improve the performance of the hard disk drive by applying the cache function in the case of the read process to not only the sequential access but also to a process of a skip read or a multithread function.
In a cache function at the time of the write process, when a write command is executed, the data transmitted from the host computer is loaded to the data buffer and the status of a termination of the command process is reported to the host computer. It is possible to drastically reduce the effective access time when the write process is executed, by writing the data loaded to the data buffer in the medium during the interval of execution of other command processes.
In the cache function at the time of the write process, it is possible to transmit the data from the data buffer to the host computer directly, when a read process to a logic block to which the read process to the medium has not terminated is issued most recently.
Furthermore, the hard disk drive can execute a reordering process wherein plural commands issued by the host computer are received by a queuing function of a command with a tag.
By the queuing function, when a queued command is executed, not only is the command executed in the order issued by the host computer, but also an order to execute is changed based on a seek time to access the medium or a waiting time for rotation. As a result, the access time can be reduced.
As described above, the hard disk drive has a large number of parameters related to the performance of the hard disk drive. However, it may be not possible to determine the respective set values of the mode parameters that contribute to improving the performance of the hard disk drive, if functions of both the host computer and the hard disk drive are not understood.
If functions of both the host computer and the hard disk drive are not understood, it is difficult to set the mode parameters properly based on the current conditions for using the drive, because a similar measurement with various combinations of the parameters is necessary to find a most proper value of the mode parameters.
When a read process command to hit a cache data loaded to the data buffer is issued, the number of the accesses to the medium is reduced so that the performance of the drive may be improved. However, when the read process command to hit a cache data loaded to the data buffer is rarely issued, overhead against the command process is increased because of the pre-fetch process to the data cache or the cache hit check process, and thereby the performance of the drive declines.
Since a present cache function is operated frequently without recognizing whether the command issued by the host computer hits the cache data, the present cache function is not always used effectively.
Furthermore, when the reordering process is executed, whether or not the cache data in the data buffer is hit deserves to be considered as well as the seek time to access the medium or the waiting time for the rotation of the medium. However, if such process is simply added, overhead based on the check process occurs in a case of a command issue pattern having a low cache hit ratio, and thereby the performance of the hard disk drive is reduced.
In addition, it is impossible to keep the same circumstances pertaining to the performance of the hard disk drive. That is, circumstances affecting the use of the hard disk drive such as temperature, humidity, the date or time to use the hard disk drive are changeable. Therefore, it is difficult to obtain a same performance result of the hard disk drive even if the hard disk drive is used in a completely same operational circumstance.